// pages/mybalance/mybalance.js
const app = getApp();
var getMyAssetsUrl = "AssetsApi/getMyAssetsV2";
Page({

  data: {
  rext:0
  },

  onLoad: function (options) {
    wx.showLoading();
    var that = this;

    wx.request({
      url: app.globalData.requestUrl + getMyAssetsUrl,
      header: {
        'content-type': 'application/json'
      },
      method: 'POST',
      data: {//这里写你要请求的参数
        userId: app.globalData.userId,
      },
      success: function (res) {
        wx.hideLoading();
        console.log(res);//打印日志
        var rextvalue = parseFloat(res.data.data.kyye).toFixed(2)
        that.setData({
          rext: rextvalue
        })
      }
    })

  },
  onShow() {
    this.getUserInfo();
  },
  getUserInfo: function (cb) {
    var that = this
    wx.login({
      success: function () {
        wx.getUserInfo({
          success: function (res) {
            that.setData({
              userInfo: res.userInfo
            });
          }
        })
      }
    })
  },




})